<?php
if (isset($_POST['uid']) &&  isset($_POST['name']) && !empty($_POST['name'])){
    include '../c/config.php';
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")){printf("Error loading character set utf8: %s\n", $mysqli->error);}
    
    $name=addslashes(trim($_POST['name']));
    $uid=addslashes(trim($_POST['uid'])); 
    $tmu=json_encode($_POST['tmu']);
    $maxid=addslashes(trim($_POST['maxid'])); 
    
    echo "INSERT INTO `xge_log` (`id`, `uid`, `name`, `tmu`,`maxid`,`createtime`) VALUES (NULL,'".$uid."','".$name."','".$tmu."','".$maxid."','".date("Y-m-d H:i:s")."')";

    $mysqli->query("INSERT INTO `xge_log` (`id`, `uid`, `name`, `tmu`,`maxid`,`createtime`) VALUES (NULL,'".$uid."','".$name."','".$tmu."','".$maxid."','".date("Y-m-d H:i:s")."')");

    $mysqli->close();


    
    echo 1;
}
